/**
 * 错误提示
 * @param {*} msg
 * @param {*} closable
 * @param {*} isLong
 */
function error(msg, closable, isLong) {
  this.$Message["error"]({
    background: true,
    content: msg,
    closable: closable ? closable : false,
    duration: isLong ? 8 : 4,
  });
}

/**
 * 成功提示
 * @param {*} msg
 * @param {*} closable
 * @param {*} isLong
 */
function success(msg, closable, isLong) {
  this.$Message["success"]({
    background: true,
    content: msg,
    closable: closable ? closable : false,
    duration: isLong ? 8 : 4,
  });
}

/**
 * 警告提示
 * @param {*} msg
 * @param {*} closable
 * @param {*} isLong
 */
function warning(msg, closable, isLong) {
  this.$Message["warning"]({
    background: true,
    content: msg,
    closable: closable ? closable : false,
    duration: isLong ? 8 : 4,
  });
}

export default {
  error,
  success,
  warning
}
